# -*- coding: utf-8 -*-
# Author   : ZhangQing
# Time     : 2025-08-14 07:12
# File     : api.py
# Project  : codebuddy_craft
# Desc     : API v1 路由集合

"""
API v1 路由集合 🛣️

集中管理所有API v1版本的路由
"""

from fastapi import APIRouter

from backend.api.auth_routes import router as auth_router
from backend.api.user_routes import router as user_router
from backend.api.project_routes import router as project_router
from backend.api.file_routes import router as file_router
from backend.api.chat_routes import router as chat_router
from backend.api.code_routes import router as code_router
from backend.api.websocket_routes import router as websocket_router
from backend.api.new_feature import router as new_feature_router

# 创建API路由器
api_router = APIRouter()

# 注册所有路由
api_router.include_router(auth_router, prefix="/auth", tags=["auth"])
api_router.include_router(user_router, prefix="/users", tags=["users"])
api_router.include_router(project_router, prefix="/projects", tags=["projects"])
api_router.include_router(file_router, prefix="/files", tags=["files"])
# 注意：chat_routes.py 已经定义了前缀 "/api/chat"，这里不再添加前缀
api_router.include_router(chat_router)
api_router.include_router(code_router, prefix="/code", tags=["code"])
api_router.include_router(websocket_router, prefix="/ws", tags=["websocket"])
# 注意：new_feature.py 已经定义了前缀 "/api/new-feature"，这里不再添加前缀
api_router.include_router(new_feature_router)